package com.autumn.oauth2.client;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableOAuth2Client;

import com.autumn.swagger.EnableAutumnSwagger;
import com.autumn.web.AbstractAutumnApplication;

/**
 * Hello world!
 *
 */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@EnableAutumnSwagger()
@EnableOAuth2Sso
@EnableOAuth2Client
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class OAuth2DemoClientApplication extends AbstractAutumnApplication {

	public static void main(String[] args) {
		run(OAuth2DemoClientApplication.class, args);
	}

	/**
	 * 基于安全配置
	 * 
	 * @return
	 *
	 *//*
		 * @Override
		 * 
		 * @Bean
		 * 
		 * @ConditionalOnMissingBean(WebSecurityConfig.class) public WebSecurityConfig
		 * webSecurityConfigurerAdapter() { return new WebSecurityConfig(); }
		 */
}
